
<template>
  <div class="img-warpper">
    <img :src="require(`@/assets/img/${item.name}.jpg`)" :alt="item.name">
    <div>
      <h1>{{item.name}}</h1>
      <h2> {{item.startday}} </h2>
    </div>
  </div>
</template>
<script>
export default {
  name: 'item',
  props: {
    item: Object
  }
}
</script>
<style lang="less" scoped>
.img-warpper {
  position: relative;
  width: 100%;
  height: 180px;
  border-radius: 15px;
  margin: 20px 0;
  overflow: hidden;
  box-shadow: 0 1px 5px 1px rgba(0, 0, 0, 0.5);
  img {
    width: 100%;
    height: 100%;
  }
  div {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 180px;
    z-index: 5;
    display: flex;
    background-color: rgba(0, 0, 0, 0.5);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    h1 {
      font-size: 40px;
      color: #d40404;
    }
    h2 {
      font-size: 20px;
      color: #ffffff;
      margin-top: 10px;
      margin-bottom: -10px;
    }
  }
}
</style>
